Optimal. Leaf size=218 \[ -\frac {2 \sqrt {2} a^3 (5 A+9 B) \tanh ^{-1}\left (\frac {\sqrt {c} \cos (e+f x)}{\sqrt {2} \sqrt {c-c \sin (e+f x)}}\right )}{c^{3/2} f}+\frac {a^3 (A+B) c^3 \cos ^7(e+f x)}{2 f (c-c \sin (e+f x))^{9/2}}+\frac {a^3 (5 A+9 B) c \cos ^5(e+f x)}{10 f (c-c \sin (e+f x))^{5/2}}+\frac {a^3 (5 A+9 B) \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}+\frac {2 a^3 (5 A+9 B) \cos (e+f x)}{c f \sqrt {c-c \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.39, antiderivative size = 218, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.132, Rules used = {3046, 2938,
2758, 2728, 212} \begin {gather*} -\frac {2 \sqrt {2} a^3 (5 A+9 B) \tanh ^{-1}\left (\frac {\sqrt {c} \cos (e+f x)}{\sqrt {2} \sqrt {c-c \sin (e+f x)}}\right )}{c^{3/2} f}+\frac {a^3 c^3 (A+B) \cos ^7(e+f x)}{2 f (c-c \sin (e+f x))^{9/2}}+\frac {a^3 c (5 A+9 B) \cos ^5(e+f x)}{10 f (c-c \sin (e+f x))^{5/2}}+\frac {a^3 (5 A+9 B) \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}+\frac {2 a^3 (5 A+9 B) \cos (e+f x)}{c f \sqrt {c-c \sin (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2728
Rule 2758
Rule 2938
Rule 3046
Rubi steps
\begin {align*} \int \frac {(a+a \sin (e+f x))^3 (A+B \sin (e+f x))}{(c-c \sin (e+f x))^{3/2}} \, dx &=\left (a^3 c^3\right ) \int \frac {\cos ^6(e+f x) (A+B \sin (e+f x))}{(c-c \sin (e+f x))^{9/2}} \, dx\\ &=\frac {a^3 (A+B) c^3 \cos ^7(e+f x)}{2 f (c-c \sin (e+f x))^{9/2}}-\frac {1}{4} \left (a^3 (5 A+9 B) c^2\right ) \int \frac {\cos ^6(e+f x)}{(c-c \sin (e+f x))^{7/2}} \, dx\\ &=\frac {a^3 (A+B) c^3 \cos ^7(e+f x)}{2 f (c-c \sin (e+f x))^{9/2}}+\frac {a^3 (5 A+9 B) c \cos ^5(e+f x)}{10 f (c-c \sin (e+f x))^{5/2}}-\frac {1}{2} \left (a^3 (5 A+9 B) c\right ) \int \frac {\cos ^4(e+f x)}{(c-c \sin (e+f x))^{5/2}} \, dx\\ &=\frac {a^3 (A+B) c^3 \cos ^7(e+f x)}{2 f (c-c \sin (e+f x))^{9/2}}+\frac {a^3 (5 A+9 B) c \cos ^5(e+f x)}{10 f (c-c \sin (e+f x))^{5/2}}+\frac {a^3 (5 A+9 B) \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}-\left (a^3 (5 A+9 B)\right ) \int \frac {\cos ^2(e+f x)}{(c-c \sin (e+f x))^{3/2}} \, dx\\ &=\frac {a^3 (A+B) c^3 \cos ^7(e+f x)}{2 f (c-c \sin (e+f x))^{9/2}}+\frac {a^3 (5 A+9 B) c \cos ^5(e+f x)}{10 f (c-c \sin (e+f x))^{5/2}}+\frac {a^3 (5 A+9 B) \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}+\frac {2 a^3 (5 A+9 B) \cos (e+f x)}{c f \sqrt {c-c \sin (e+f x)}}-\frac {\left (2 a^3 (5 A+9 B)\right ) \int \frac {1}{\sqrt {c-c \sin (e+f x)}} \, dx}{c}\\ &=\frac {a^3 (A+B) c^3 \cos ^7(e+f x)}{2 f (c-c \sin (e+f x))^{9/2}}+\frac {a^3 (5 A+9 B) c \cos ^5(e+f x)}{10 f (c-c \sin (e+f x))^{5/2}}+\frac {a^3 (5 A+9 B) \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}+\frac {2 a^3 (5 A+9 B) \cos (e+f x)}{c f \sqrt {c-c \sin (e+f x)}}+\frac {\left (4 a^3 (5 A+9 B)\right ) \text {Subst}\left (\int \frac {1}{2 c-x^2} \, dx,x,-\frac {c \cos (e+f x)}{\sqrt {c-c \sin (e+f x)}}\right )}{c f}\\ &=-\frac {2 \sqrt {2} a^3 (5 A+9 B) \tanh ^{-1}\left (\frac {\sqrt {c} \cos (e+f x)}{\sqrt {2} \sqrt {c-c \sin (e+f x)}}\right )}{c^{3/2} f}+\frac {a^3 (A+B) c^3 \cos ^7(e+f x)}{2 f (c-c \sin (e+f x))^{9/2}}+\frac {a^3 (5 A+9 B) c \cos ^5(e+f x)}{10 f (c-c \sin (e+f x))^{5/2}}+\frac {a^3 (5 A+9 B) \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}+\frac {2 a^3 (5 A+9 B) \cos (e+f x)}{c f \sqrt {c-c \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 1.11, size = 444, normalized size = 2.04 \begin {gather*} \frac {a^3 \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) (1+\sin (e+f x))^3 \left (120 (A+B) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )+(120+120 i) \sqrt [4]{-1} (5 A+9 B) \tan ^{-1}\left (\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt [4]{-1} \left (1+\tan \left (\frac {1}{4} (e+f x)\right )\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^2+30 (9 A+20 B) \cos \left (\frac {1}{2} (e+f x)\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^2-5 (2 A+9 B) \cos \left (\frac {3}{2} (e+f x)\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^2-3 B \cos \left (\frac {5}{2} (e+f x)\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^2+240 (A+B) \sin \left (\frac {1}{2} (e+f x)\right )+30 (9 A+20 B) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^2 \sin \left (\frac {1}{2} (e+f x)\right )+5 (2 A+9 B) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^2 \sin \left (\frac {3}{2} (e+f x)\right )-3 B \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^2 \sin \left (\frac {5}{2} (e+f x)\right )\right )}{30 f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^6 (c-c \sin (e+f x))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 7.24, size = 354, normalized size = 1.62
method | result | size |
default | \(\frac {2 a^{3} \left (\sin \left (f x +e \right ) \left (-5 A \left (c +c \sin \left (f x +e \right )\right )^{\frac {3}{2}} c^{\frac {3}{2}}-60 A \sqrt {c +c \sin \left (f x +e \right )}\, c^{\frac {5}{2}}-3 B \left (c +c \sin \left (f x +e \right )\right )^{\frac {5}{2}} \sqrt {c}-15 B \left (c +c \sin \left (f x +e \right )\right )^{\frac {3}{2}} c^{\frac {3}{2}}-120 B \sqrt {c +c \sin \left (f x +e \right )}\, c^{\frac {5}{2}}+75 A \sqrt {2}\, \arctanh \left (\frac {\sqrt {c +c \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {c}}\right ) c^{3}+135 B \sqrt {2}\, \arctanh \left (\frac {\sqrt {c +c \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {c}}\right ) c^{3}\right )+5 A \left (c +c \sin \left (f x +e \right )\right )^{\frac {3}{2}} c^{\frac {3}{2}}+90 A \sqrt {c +c \sin \left (f x +e \right )}\, c^{\frac {5}{2}}+3 B \left (c +c \sin \left (f x +e \right )\right )^{\frac {5}{2}} \sqrt {c}+15 B \left (c +c \sin \left (f x +e \right )\right )^{\frac {3}{2}} c^{\frac {3}{2}}+150 B \sqrt {c +c \sin \left (f x +e \right )}\, c^{\frac {5}{2}}-75 A \sqrt {2}\, \arctanh \left (\frac {\sqrt {c +c \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {c}}\right ) c^{3}-135 B \sqrt {2}\, \arctanh \left (\frac {\sqrt {c +c \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {c}}\right ) c^{3}\right ) \sqrt {c \left (1+\sin \left (f x +e \right )\right )}}{15 c^{\frac {9}{2}} \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}\) | \(354\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 458 vs.
\(2 (205) = 410\).
time = 0.37, size = 458, normalized size = 2.10 \begin {gather*} \frac {\frac {15 \, \sqrt {2} {\left ({\left (5 \, A + 9 \, B\right )} a^{3} c \cos \left (f x + e\right )^{2} - {\left (5 \, A + 9 \, B\right )} a^{3} c \cos \left (f x + e\right ) - 2 \, {\left (5 \, A + 9 \, B\right )} a^{3} c + {\left ({\left (5 \, A + 9 \, B\right )} a^{3} c \cos \left (f x + e\right ) + 2 \, {\left (5 \, A + 9 \, B\right )} a^{3} c\right )} \sin \left (f x + e\right )\right )} \log \left (-\frac {\cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right ) - 2\right )} \sin \left (f x + e\right ) - \frac {2 \, \sqrt {2} \sqrt {-c \sin \left (f x + e\right ) + c} {\left (\cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1\right )}}{\sqrt {c}} + 3 \, \cos \left (f x + e\right ) + 2}{\cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right )}{\sqrt {c}} + 2 \, {\left (3 \, B a^{3} \cos \left (f x + e\right )^{4} - {\left (5 \, A + 18 \, B\right )} a^{3} \cos \left (f x + e\right )^{3} - {\left (65 \, A + 141 \, B\right )} a^{3} \cos \left (f x + e\right )^{2} - 30 \, {\left (3 \, A + 5 \, B\right )} a^{3} \cos \left (f x + e\right ) - 30 \, {\left (A + B\right )} a^{3} - {\left (3 \, B a^{3} \cos \left (f x + e\right )^{3} + {\left (5 \, A + 21 \, B\right )} a^{3} \cos \left (f x + e\right )^{2} - 60 \, {\left (A + 2 \, B\right )} a^{3} \cos \left (f x + e\right ) + 30 \, {\left (A + B\right )} a^{3}\right )} \sin \left (f x + e\right )\right )} \sqrt {-c \sin \left (f x + e\right ) + c}}{15 \, {\left (c^{2} f \cos \left (f x + e\right )^{2} - c^{2} f \cos \left (f x + e\right ) - 2 \, c^{2} f + {\left (c^{2} f \cos \left (f x + e\right ) + 2 \, c^{2} f\right )} \sin \left (f x + e\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 764 vs.
\(2 (205) = 410\).
time = 0.60, size = 764, normalized size = 3.50 \begin {gather*} -\frac {\frac {30 \, \sqrt {2} {\left (5 \, A a^{3} \sqrt {c} + 9 \, B a^{3} \sqrt {c}\right )} \log \left (-\frac {\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1}\right )}{c^{2} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} + \frac {15 \, \sqrt {2} {\left (\frac {A a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1} + \frac {B a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1}\right )}}{c^{2} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {15 \, \sqrt {2} {\left (A a^{3} \sqrt {c} + B a^{3} \sqrt {c} + \frac {10 \, A a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1} + \frac {18 \, B a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1}\right )} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}}{c^{2} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {16 \, \sqrt {2} {\left (35 \, A a^{3} \sqrt {c} + 81 \, B a^{3} \sqrt {c} - \frac {130 \, A a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1} - \frac {270 \, B a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1} + \frac {200 \, A a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}^{2}}{{\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{2}} + \frac {480 \, B a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}^{2}}{{\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{2}} - \frac {150 \, A a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}^{3}}{{\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{3}} - \frac {330 \, B a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}^{3}}{{\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{3}} + \frac {45 \, A a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}^{4}}{{\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{4}} + \frac {135 \, B a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}^{4}}{{\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{4}}\right )}}{c^{2} {\left (\frac {\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1} - 1\right )}^{5} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{30 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (A+B\,\sin \left (e+f\,x\right )\right )\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^3}{{\left (c-c\,\sin \left (e+f\,x\right )\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________